/*
 * ProjectTreeNode.java
 * 
 * last update: 14.01.2010 by Stefan Saru
 * 
 * author:	Felix(felix@ulise.cs.pub.ro)
 *
 * Obs: N/A
 */

package ide;

import java.util.*;
import java.awt.*;
import javax.swing.*;


class ProjectTreeNode {

	final public static int FILETYPE     = 0;
	final public static int MODULETYPE   = 1;
	final public static int INCLUDETYPE  = 12;

	final public static int WIRETYPE     = 2;
	final public static int REGTYPE      = 3;

	final public static int PORTTYPE     = 4;
	final public static int INPUTTYPE    = 5;
	final public static int OUTPUTTYPE   = 6;
	final public static int INOUTTYPE    = 7;
	final public static int PROJECTTYPE  = 8;

	final public static int TASKTYPE     = 9;
	final public static int FUNCTIONTYPE = 10;
	final public static int BLOCKTYPE    = 11;

	static ImageIcon []  icons = new ImageIcon[15];

	static {
		for(int i = 0; i < 15 ; i++){
			icons[i] = new ImageIcon(vide.baseDir + "images/tree" + i + ".gif");   ///p" + i + ".gif");
		}
	}

	public int type;
	public int line;
	public String name;
	public String fileName;

	public ProjectTreeNode(String fileName, String name, int line, int type){
		this.name = name;
		this.fileName = fileName;
		this.type = type;
		this.line = line;
	}


	public String toString(){
		return name;
	}

	//returns the fully qualified name
	public String getFQN(){
		return fileName;
		//todo
	}

	public boolean equals(Object o) {
		return o.toString().equals(name);
	}

	public ImageIcon getIcon() {
		return icons[type];
	}

	public int getType(){
		return type;
	}
}













